home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Codigo / hh / rsource.exe / Hexen Source / AM_MAP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-22  |  3.5 KB  |  144 lines

  1.  
  2. //**************************************************************************
  3. //**
  4. //** am_map.h : Heretic 2 : Raven Software, Corp.
  5. //**
  6. //** $RCSfile: am_map.h,v $
  7. //** $Revision: 1.3 $
  8. //** $Date: 95/12/31 19:47:21 $
  9. //** $Author: bgokey $
  10. //**
  11. //**************************************************************************
  12.  
  13. #ifndef __AMMAP_H__
  14. #define __AMMAP_H__
  15.  
  16. #pragma once
  17.  
  18. // For use if I do walls with outsides/insides
  19. #define REDS        12*8
  20. #define REDRANGE    1//16
  21. #define BLUES        (256-4*16+8)
  22. #define BLUERANGE    1//8
  23. #define GREENS        (33*8)
  24. #define GREENRANGE    1//16
  25. #define GRAYS        (5*8)
  26. #define GRAYSRANGE    1//16
  27. #define BROWNS        (14*8)
  28. #define BROWNRANGE    1//16
  29. #define YELLOWS        10*8
  30. #define YELLOWRANGE    1
  31. #define BLACK        0
  32. #define WHITE        4*8
  33. #define PARCH        13*8-1
  34. #define BLOODRED      177
  35. #define BLUEKEY     157
  36. #define YELLOWKEY     137
  37. #define GREENKEY      198
  38.  
  39. // Automap colors
  40.  
  41. #define AM_PLR1_COLOR 157 // Blue
  42. #define AM_PLR2_COLOR 177 // Red
  43. #define AM_PLR3_COLOR 137 // Yellow
  44. #define AM_PLR4_COLOR 198 // Green
  45. #define AM_PLR5_COLOR 215 // Jade
  46. #define AM_PLR6_COLOR 32  // White
  47. #define AM_PLR7_COLOR 106 // Hazel
  48. #define AM_PLR8_COLOR 234 // Purple
  49.  
  50. #define BACKGROUND    PARCH
  51. #define YOURCOLORS    WHITE
  52. #define YOURRANGE    0
  53. #define WALLCOLORS    REDS
  54. #define WALLRANGE    REDRANGE
  55. #define TSWALLCOLORS    GRAYS
  56. #define TSWALLRANGE    GRAYSRANGE
  57. #define FDWALLCOLORS    BROWNS
  58. #define FDWALLRANGE    BROWNRANGE
  59. #define CDWALLCOLORS    YELLOWS
  60. #define CDWALLRANGE    YELLOWRANGE
  61. #define THINGCOLORS    GREENS
  62. #define THINGRANGE    GREENRANGE
  63. #define SECRETWALLCOLORS WALLCOLORS
  64. #define SECRETWALLRANGE WALLRANGE
  65. #define GRIDCOLORS    (GRAYS + GRAYSRANGE/2)
  66. #define GRIDRANGE    0
  67. #define XHAIRCOLORS    GRAYS
  68.  
  69. // drawing stuff
  70. #define    FB        0
  71.  
  72. #define KEY_TAB    9
  73. #define AM_PANDOWNKEY    KEY_DOWNARROW
  74. #define AM_PANUPKEY    KEY_UPARROW
  75. #define AM_PANRIGHTKEY    KEY_RIGHTARROW
  76. #define AM_PANLEFTKEY    KEY_LEFTARROW
  77. //#define AM_PANDOWNKEY    SC_DOWNARROW
  78. //#define AM_PANUPKEY        SC_UPARROW
  79. //#define AM_PANRIGHTKEY    SC_RIGHTARROW
  80. //#define AM_PANLEFTKEY    SC_LEFTARROW
  81.  
  82. #define AM_ZOOMINKEY    '='
  83. //#define AM_ZOOMINKEY        13
  84. //#define AM_ZOOMOUTKEY     12
  85.  #define AM_ZOOMOUTKEY    '-'
  86. #define AM_STARTKEY    KEY_TAB
  87. #define AM_ENDKEY    KEY_TAB
  88. #define AM_GOBIGKEY    '0'
  89. //#define AM_GOBIGKEY        11
  90. //#define AM_FOLLOWKEY     33
  91. //#define AM_GRIDKEY        34
  92. #define AM_FOLLOWKEY    'f'
  93. #define AM_GRIDKEY    'g'
  94.  
  95. #define AM_NUMMARKPOINTS 10
  96.  
  97. #define AM_MSGHEADER (('a'<<24)+('m'<<16))
  98. #define AM_MSGENTERED (AM_MSGHEADER | ('e'<<8))
  99. #define AM_MSGEXITED (AM_MSGHEADER | ('x'<<8))
  100.  
  101. #define INITSCALEMTOF (.2*FRACUNIT) // scale on entry
  102. // how much the automap moves window per tic in frame-buffer coordinates
  103. #define F_PANINC    4 // moves 140 pixels in 1 second
  104. // how much zoom-in per tic
  105. #define M_ZOOMIN        ((int) (1.02*FRACUNIT)) // goes to 2x in 1 second
  106. // how much zoom-out per tic
  107. #define M_ZOOMOUT       ((int) (FRACUNIT/1.02)) // pulls out to 0.5x in 1 second
  108.  
  109. // translates between frame-buffer and map distances
  110. #define FTOM(x) FixedMul(((x)<<16),scale_ftom)
  111. #define MTOF(x) (FixedMul((x),scale_mtof)>>16)
  112. // translates between frame-buffer and map coordinates
  113. #define CXMTOF(x)  (f_x + MTOF((x)-m_x))
  114. #define CYMTOF(y)  (f_y + (f_h - MTOF((y)-m_y)))
  115.  
  116. // the following is crap
  117. #define LINE_NEVERSEE ML_DONTDRAW
  118.  
  119. typedef struct
  120. {
  121.   int x, y;
  122. } fpoint_t;
  123.  
  124. typedef struct
  125. {
  126.   fpoint_t a, b;
  127. } fline_t;
  128.  
  129. typedef vertex_t mpoint_t;
  130.  
  131. typedef struct
  132. {
  133.   mpoint_t a, b;
  134. } mline_t;
  135.  
  136. typedef struct
  137. {
  138.   fixed_t slp, islp;
  139. } islope_t;
  140.  
  141. // extern int f_x, f_y, f_w, f_h;
  142.  
  143. #endif
  144.